home *** CD-ROM | disk | FTP | other *** search
/ Software 2000 / Software 2000 Volume 1 (Disc 1 of 2).iso / aga / aga137.dms / in.adf / Processors / CLI / pixelizer.doc < prev    next >
Encoding:
Text File  |  1991-01-26  |  5.4 KB  |  116 lines

  1. ---------------------------------------------------------------------
  2. 3]PIXELIZER DOCS
  3. 3]V1.0
  4. 3](c) Copyright 1988, Christopher (Thumper) Halsall, All rights Reserved
  5. 3]Freely Distributable for non-profit only.
  6. 3]Published in JUMPDISK with author's permission
  7. ---------------------------------------------------------------------
  8.  
  9.      Pixelizer will take a non-HAM IFF picture of any displayable size,
  10. pixelize it to the pixel vertical and horizontal size given and save the
  11. picture out again.
  12.      This program was written in six hours to solve a need that I had with
  13. an animation I was working on, and was not optimized at all for speed. If
  14. it's too slow for you, write me for the source.
  15.      Thanks must go to Jim Kent, as I used his PD IFF code to load and save
  16. the IFF images, and production time would not have been as short if
  17. these were not available to me. THANKS!
  18.      Oh, This software is offered "as is" with no representation of fitness
  19. for any particular purpose other than taking up disk space. The user
  20. assumes all risks and responsibilities related to its use, and my
  21. liabilities are limited to a red face and owing the person whose hard
  22. drive pixelizer managed to crash a beer at the pub of my choice.
  23.      Sorry, my lawyer just dropped by to talk about the charges against me
  24. for doing lines of carrots in public, and commented in the lack of a
  25. disclaimer.
  26.  
  27. Use:
  28.  
  29.    Pixelize SourcePicture DestinationPicture [PixelXSize [PixelYSize]]
  30.  
  31. Where:
  32.  
  33.    SourcePicture is the IFF file you wish to pixelize.
  34.  
  35.    DestinationPicture is the file name under which you wish to save the
  36. pixelized image. DestinationPicture may be the same as SourcePicture if you
  37. wish to overwrite the original, or "nil:" if you don't want any output.
  38.  
  39.    PixelXSize is the width of the pixels to be created. Any size from 2 and
  40. up is valid. If this value is not given, 2 is used.
  41.  
  42.    PixelYSize is the height of the pixels to be created. Again, any size
  43. from 2 and up is valid. If this isn't given, PixelXSize is used for
  44. PixelYSize as well.
  45.  
  46. Examples:
  47.  
  48. "Pixelize ram:TestPicture ram:TestPicturePixelized 2 50"
  49.  
  50.      Loads TestPicture from ram:, creates pixels that are 2 pixels wide and
  51. 50 pixels high, and saves the file back to ram under the name of
  52. TestPicturePixelized.
  53.  
  54. "Pixelize ram:TestPicture nil: 5000 5000"
  55.  
  56.      Loads TestPicture from ram:, creates pixels that are 5000 pixels square
  57. and delays five seconds; no output file is created. Please note that giving
  58. a pixel size as large as this simply fills the whole screen with the color
  59. that happens to be in the center of the screen. However, wild effects can be
  60. created by giving very large values for one dimension, and small values for
  61. the other.
  62.  
  63. "Pixelize ram:TestPicture ram:TestPicture"
  64.  
  65.      Loads TestPicture from ram:, creates pixels that are 2 pixels square
  66. and saves the result back over TestPicture.
  67.  
  68. "Pixelize ram:TestPicture"
  69.  
  70.      Loads TestPicture from ram:, creates pixels that are 2 pixels square,
  71. but doesn't produce any output file. When no output file is given, or "nil:"
  72. is given as the output file, Pixelize delays 5 seconds and then quits.
  73.  
  74. 3]NOTES
  75.      In this section, a Virtual Pixel is the rectangle of size PixelXSize
  76. wide by PixelYSize high which you specify, and a Real Pixel is a point on a
  77. screen which is the smallest possible, or a real pixel.
  78.      The algorithm for this program guarantees there will always be a
  79. Virtual pixel in the exact center of the screen. Thus, if you have an
  80. animation sequence where you pixelize an image from small virtual pixels to
  81. large virtual pixels, it will appear as if the center virtual pixel grows.
  82. This effect is desirable.
  83.      The color of the virtual pixel comes from the color of the real pixel
  84. at the center of the virtual pixel, rather than the upper left hand corner.
  85. Further, please be aware that this does NOT do pixel averaging, but simply
  86. takes the center real pixel of each virtual pixel, and makes it as large as
  87. the virtual pixel.
  88.    As examples:
  89.   
  90.     Real pixels:                                  Real Pixels:
  91.          |                                              |
  92.        RRYYB                                          RRRRR
  93.        RRYYB                                          RRRRR
  94.       -RRRYY-    Would produce a virtual pixel of:   -RRRRR-
  95.        RRRBB                                          RRRRR
  96.        RRRRR     R=Red       Y=Yellow       B=Blue    RRRRR
  97.          |                                              |
  98.  
  99.      This method of operation can at times be desirable, and at other times
  100. undesirable. I foresee a personal need for pixel averaging pixelization in
  101. the near future, so I will be adding it soon. Until then, if you have a big
  102. need for it, write or call and scream real loud.
  103.         Also, if the center of the virtual pixel is in fact off screen,
  104. color 0 is used. This may not suit all situations, but it suited mine at the
  105. time. When the pixel-averaging algorithm is installed, border pixel cases
  106. will be handled properly (or differently, depending on your point of view.)
  107.    Hold And Modify mode is not supported, as HAM is a rather bizarre thing
  108. to try to support, and I didn't have the need. Maybe someday, but not soon.
  109.    Last, there is no Workbench support. It doesn't crash, but it doesn't do
  110. much either.
  111.      Address: Christopher Halsall, Managing (Mangy) Programmer, LateNight
  112. Developments Corp., #202-306 Burnside Road West, Victoria, B.C., V8Z 1M1,
  113. Canada. Phone: (604) 380-3032.
  114.  
  115. 4]END OF TEXT
  116.